<%@ page import="java.util.List" %>
<%@ page import="com.foreknow.model.Guestbook" %><%--
  Created by IntelliJ IDEA.
  User: imac
  Date: 2022/4/8
  Time: 7:17 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/ManagerSystemProject_war_exploded/css/bootstrap.min.css">
</head>
<body>
username: ${sessionScope.username}
<table class="table table-hover">
    <tr>
        <td>编号</td>
        <td>姓名</td>
        <td>电话号码</td>
        <td>邮箱</td>
        <td>标题</td>
        <td>内容</td>
        <td>创建时间</td>
    </tr>
<%--    <%--%>
<%--        //可以写java代码--%>
<%--        //1.从request中根据key获取到集合的对象--%>
<%--        List<Object> list= (List<Object>) request.getAttribute("list");--%>
<%--        for (int i = 0;i<list.size();i++){--%>
<%--            Guestbook gb = (Guestbook) list.get(i);--%>
<%--    %>--%>
    <c:forEach var="gb" items="${list}">
        <tr>
            <td>${gb.id}</td>
            <td>${gb.name}</td>
            <td>${gb.phone}</td>
            <td>${gb.email}</td>
            <td>${gb.title}</td>
            <td>${gb.content}</td>
            <td>${gb.createtime}</td>
        </tr>
    </c:forEach>


</table>

</body>
</html>